// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IPlatformFileToolkit.cs" company="Mar3ek">
//   Copyright (c) Mar3ek 2012
// </copyright>
// <summary>
//   The PlatformFileToolkit interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DownloaderCore
{
    using System.IO;

    /// <summary>
    /// The PlatformFileToolkit interface.
    /// </summary>
    public interface IPlatformFileToolkit
    {
        /// <summary> Opens a file. </summary>
        /// <param name="path"> Full pathname of the file. </param>
        /// <returns> File stream. </returns>
        Stream OpenFile(string path);

        /// <summary> Deletes the file described by path. </summary>
        /// <param name="path"> Full pathname of the file. </param>
        void DeleteFile(string path);

        /// <summary> Queries if a given file exists. </summary>
        /// <param name="path"> Full pathname of the file. </param>
        /// <returns> true if it succeeds, false if it fails. </returns>
        bool FileExists(string path);

        /// <summary> Gets file size. </summary>
        /// <param name="path"> Full pathname of the file. </param>
        /// <returns> The file size. </returns>
        long GetFileSize(string path);
    }
}